﻿@model FPP.Models.User
@if (!HttpContext.Current.User.Identity.IsAuthenticated || Model == null || Model.Id == 0)
{
    using (Html.BeginForm())
    {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Login Information</legend>
        <div class="editor-label">
            @Html.LabelFor(model => model.Email)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Email)
            @Html.ValidationMessageFor(model => model.Email)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Password)
        </div>
        <div class="editor-field">
            @Html.PasswordFor(model => model.Password)
            @Html.ValidationMessageFor(model => model.Password)
        </div>
        <p>
            <input type="submit" value="Login" />
        </p>
        <p>
            Not a member? @Html.ActionLink("Register Here", "Create", "User")
        </p>
    </fieldset>
    }

}
else
{
    @string.Format("Welcome {0} {1}", Model.FirstName, Model.LastName);
}
